<style type="text/css" media="screen">
.n-bottom span.n-error{
    margin-top: -10px !important;
}
hr {
    margin-top: 0px;
    margin-bottom: 15px;
    border: 0;
    border-top: 1px solid #ccc;
}

</style>
<form id="add-form" class="form-horizontal " role="form" data-toggle="validator" method="POST" action="">
    <!--  -->
    <div class="row">
        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>项目名称:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control" id="c-name" name="row[name]" type="text"  placeholder="请填写项目名称" value="{$row.name}" data-rule="required">
            </div>
        </div>

       <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>总投资(亿元):</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control" id="c-investment_total" name="row[investment_total]" type="number"  placeholder="请填写总投资(亿元)" value="{$row.investment_total}" data-rule="required" onkeyup="clearNoNum(this)" >
            </div>
        </div>


        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>占地面积(亩):</label>
            <div class="col-xs-12 col-sm-9">
                <input id="carrier_area" class="form-control" name="row[carrier_area]" type="text" value="{$row.carrier_area}" placeholder="请填写占地面积" data-rule="required">
            </div>
        </div>


        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">计划准入时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input id="c-access_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" placeholder="请选择计划准入时间" data-use-current="true" name="row[access_time]" type="text" value="{$row.access_time_desc}">
            </div>
        </div>

        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>协办单位:</label>
            <div class="col-xs-12 col-sm-9">
                <select class="form-control" name="row[chargedep_ids]" id="c-chargedep_ids" title="请选择" data-rule="required">
                    <option value="">请选择</option>
                    {volist name="chargedep_list" id="vo" }
                        <option value="{$vo.id}" {if $row.chargedep_ids==$vo.id} selected {/if}>{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>


        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>责任单位:</label>
            <div class="col-xs-12 col-sm-9">
                <select class="form-control" name="row[settle_street_ids]" id="c-settle_street_ids" title="请选择" data-rule="required">
                    <option value="">请选择</option>
                    {volist name="chargedep_list" id="vo" }
                        <option value="{$vo.id}" {if $row.settle_street_ids==$vo.id} selected {/if}>{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>

        <div class="form-group col-sm-12">
            <label class="control-label col-xs-12 col-sm-2" style="margin-left: -44px;"><span style="color: red;">*</span>项目简介:</label>
            <div class="col-xs-12 col-sm-10">
                <textarea  class="form-control" id="c-summary" name="row[summary]" rows="5"  cols="50" placeholder="请填写项目简介" data-rule="required">{$row.summary}</textarea>
            </div>
        </div>

        <div class="form-group col-sm-12">
            <label class="control-label col-xs-12 col-sm-2" style="margin-left: -44px;"><span style="color: red;">*</span>进展情况:</label>
            <div class="col-xs-12 col-sm-10">
                <textarea  class="form-control" id="c-status_name" name="row[status_name]" rows="5"  cols="50" placeholder="请填写项目简介" data-rule="required">{$row.status_name}</textarea>             
            </div>
        </div>
    

        <div class="form-group col-sm-12">
            <label class="control-label col-xs-12 col-sm-2" style="margin-left: -44px;"><span style="color: red;">*</span>存在问题:</label>
            <div class="col-xs-12 col-sm-10">
                <textarea class="form-control" id="c-exist_question" name="row[exist_question]" rows="5" cols="50" placeholder="请填写存在问题" data-rule="required">{$row.exist_question}</textarea>
            </div>
        </div>



        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">计划签约时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="sign_time" data-date-format="YYYY-MM-DD" name="row[sign_time]" type="text" placeholder="请选择计划签约时间" value="{$row.sign_time_desc}">
            </div>
        </div>

        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">拿地时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="land_time" data-date-format="YYYY-MM-DD" name="row[land_time]" type="text" placeholder="请选择拿地时间" value="{$row.land_time_desc}">
            </div>
        </div>
        <!-- <div class="form-group col-sm-6"></div> -->

        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">签订框架协议时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="framework_agreement_time" data-date-format="YYYY-MM-DD" name="row[framework_agreement_time]" type="text" placeholder="请选择计划签约时间" value="{$row.framework_agreement_time_desc}">
            </div>
        </div>

        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">签订正式协议时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="invesment_agreement_time" data-date-format="YYYY-MM-DD" name="row[invesment_agreement_time]" type="text" placeholder="请选择签订正式协议时间" value="{$row.invesment_agreement_time_desc}">
            </div>
        </div>


        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">完成拆迁时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="remove_time" data-date-format="YYYY-MM-DD" name="row[remove_time]" type="text" placeholder="请选择完成拆迁时间" value="{$row.remove_time_desc}">
            </div>
        </div>

        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">注册时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="register_time" data-date-format="YYYY-MM-DD" name="row[register_time]" type="text" placeholder="请选择注册时间" value="{$row.register_time_desc}">
            </div>
        </div>

        <!-- <div class="form-group col-sm-6"></div> -->


        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">开工时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="start_construction_time" data-date-format="YYYY-MM-DD" name="row[start_construction_time]" type="text" placeholder="请选择开工时间" value="{$row.start_construction_time_desc}">
            </div>
        </div>

        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3">运营时间:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control datetimepicker" id="operate_time" data-date-format="YYYY-MM-DD" name="row[operate_time]" type="text" placeholder="请选择运营时间" value="{$row.operate_time_desc}">
            </div>
        </div>


        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>项目当前阶段:</label>
            <div class="col-xs-12 col-sm-9">
                <select class="form-control" name="row[status_id]" id="c-status_id" title="请选择" data-rule="required">
                    <option value="">请选择</option>
                    {volist name="progress_list" id="vo" }
                        <option value="{$vo.id}" {if $row.status_id==$vo.id} selected {/if}>{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>


        <div class="form-group col-sm-6">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>专题调度项目类型:</label>
            <div class="col-xs-12 col-sm-9">
             {:build_select('row[command_typeid][]',$command_list,$row.command_typeid,['id'=>"command_typeid",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
            </div>
        </div>
        
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    function clearNoNum(obj){
        obj.value = obj.value.replace(/[^\d.]/g,"");//清除"数字"和"."以外的字符
        obj.value = obj.value.replace(/^\./g,"");//验证第一个字符是数字而不是字符
        obj.value = obj.value.replace(/\.{2,}/g,".");//只保留第一个.清除多余的
        obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
        obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');//只能输入两个小数
    }
</script>
